The invention relates to a method for automatic defect recognition in testpieces by means of an X-ray examination unit with an X-ray tube, a detector and a mechanical manipulator for positioning the testpiece in the beam path of the X-ray examination unit, wherein a positioning image of the testpiece is compared with an ideal reference image.
In the automatic defect recognition of testpieces by means of non-destructive analysis, an X-ray image of the testpiece is compared with an X-ray image of a different defect-free testpiece which serves as X-ray reference image. The decision whether a defective testpiece is present or not is reached solely on the basis of the automatic comparison between this X-ray reference image and the X-ray image of the testpiece without human involvement. On the one hand, each defective testpiece must necessarily be recognized, but on the other hand there should be as few as possible incorrect detections—in which testpieces that are actually defect-free are recognized as defective because the image of the testpiece deviates too markedly from the reference image.
Such incorrect detections often occur in the case of inaccuracies in the positioning of the testpiece, with the result that the comparison image produced of the latter has been displaced and/or twisted vis-à-vis the reference image. Due to the many degrees of freedom in positioning the testpiece in the X-ray examination unit, this is the rule rather than the exception. If for example a robot is used to grip and position the testpiece, there are already six degrees of freedom just in the gripping of the testpiece. If a pallet system is used, there are likewise six degrees of freedom with regard to the positional tolerance of the testpiece on the pallet due to natural testpiece tolerance (translation in three directions and rotation about each axis of translation); but to a much lesser extent than when gripping. In the case of a geared unit there are three degrees of freedom due to the conveyance and manipulator tolerance. Added to these in each case are also the component tolerances from production.
To date, this problem has been solved by using distinctive points in each case in the comparison image of the testpiece and of the reference image to match—regularly shift—the image processing regions. However, only three degrees of freedom can be corrected in this case and, because of the reliance on only a few distinctive points in the comparison image and in the reference image, it is also optimum only for these distinctive points in the comparison image. This is because in a two-dimensional image, in principle only the translation in two directions and the rotation on the plane are corrected, because otherwise there may be a significant loss of image information. Otherwise, three-dimensional information about the testpiece would have to be available. At the other points a greater deviation can occur between the comparison image and the reference image, which usually leads to a high proportion of incorrect detections.
Another method practised to date consists of pixel-by-pixel correction of the inaccuracy in positioning vis-à-vis the reference image through a similarity transformation between the reference image and the comparison image of the testpiece. Such a method involves a great deal of computation. Although a correction is carried out over the whole comparison image in this case, deviations from the set value can still occur which restrict the recognizability of defects.